home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / cvs-1.8 / cvs-1 / cvs-1.8.1 / doc / cvs.info-3 < prev    next >
Encoding:
GNU Info File  |  1996-05-06  |  49.8 KB  |  1,271 lines

  1. This is Info file cvs.info, produced by Makeinfo-1.63 from the input
  2. file ./cvs.texinfo.
  3.  
  4.    Copyright (C) 1992, 1993 Signum Support AB Copyright (C) 1993, 1994
  5. Free Software Foundation, Inc.
  6.  
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.  
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the section entitled "GNU General Public License" is included
  14. exactly as in the original, and provided that the entire resulting
  15. derived work is distributed under the terms of a permission notice
  16. identical to this one.
  17.  
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions, except that the section entitled "GNU General Public License"
  21. and this permission notice may be included in translations approved by
  22. the Free Software Foundation instead of in the original English.
  23.  
  24. 
  25. File: cvs.info,  Node: user-defined logging,  Next: annotate,  Prev: history database,  Up: History browsing
  26.  
  27. User-defined logging
  28. ====================
  29.  
  30.    You can customize CVS to log various kinds of actions, in whatever
  31. manner you choose.  These mechanisms operate by executing a script at
  32. various times.  The script might append a message to a file listing the
  33. information and the programmer who created it, or send mail to a group
  34. of developers, or, perhaps, post a message to a particular newsgroup.
  35. To log commits, use the `loginfo' file (*note loginfo::.).  To log
  36. commits, checkouts, exports, and tags, respectively, you can also use
  37. the `-i', `-o', `-e', and `-t' options in the modules file.  For a more
  38. flexible way of giving notifications to various users, which requires
  39. less in the way of keeping centralized scripts up to date, use the `cvs
  40. watch add' command (*note Getting Notified::.); this command is useful
  41. even if you are not using `cvs watch on'.
  42.  
  43.    The `taginfo' file defines programs to execute when someone executes
  44. a `tag' or `rtag' command.  The `taginfo' file has the standard form
  45. for administrative files (*note Administrative files::.), where each
  46. line is a regular expression followed by a command to execute.  The
  47. arguments passed to the command are, in order, the TAGNAME, OPERATION
  48. (`add' for `tag', `mov' for `tag -F', and `del' for `tag -d'),
  49. REPOSITORY, and any remaining are pairs of FILENAME REVISION.  A
  50. non-zero exit of the filter program will cause the tag to be aborted.
  51.  
  52. 
  53. File: cvs.info,  Node: annotate,  Prev: user-defined logging,  Up: History browsing
  54.  
  55. Annotate command
  56. ================
  57.  
  58.  - Command: cvs annotate [`-l'] FILES ...
  59.      For each file in FILES, print the head revision of the trunk,
  60.      together with information on the last modification for each line.
  61.      The `-l' option means to process the local directory only, not to
  62.      recurse (*note Common options::.).  For example:
  63.  
  64.           $ cvs annotate ssfile
  65.           Annotations for ssfile
  66.           ***************
  67.           1.1          (mary     27-Mar-96): ssfile line 1
  68.           1.2          (joe      28-Mar-96): ssfile line 2
  69.  
  70.      The file `ssfile' currently contains two lines.  The `ssfile line
  71.      1' line was checked in by `mary' on March 27.  Then, on March 28,
  72.      `joe' added a line `ssfile line 2', without modifying the `ssfile
  73.      line 1' line.  This report doesn't tell you anything about lines
  74.      which have been deleted or replaced; you need to use `cvs diff'
  75.      for that (*note diff::.).
  76.  
  77.  
  78. 
  79. File: cvs.info,  Node: Keyword substitution,  Next: Binary files,  Prev: History browsing,  Up: Top
  80.  
  81. Keyword substitution
  82. ********************
  83.  
  84.    As long as you edit source files inside your working copy of a
  85. module you can always find out the state of your files via `cvs status'
  86. and `cvs log'.  But as soon as you export the files from your
  87. development environment it becomes harder to identify which revisions
  88. they are.
  89.  
  90.    RCS uses a mechanism known as "keyword substitution" (or "keyword
  91. expansion") to help identifying the files.  Embedded strings of the form
  92. `$KEYWORD$' and `$KEYWORD:...$' in a file are replaced with strings of
  93. the form `$KEYWORD:VALUE$' whenever you obtain a new revision of the
  94. file.
  95.  
  96. * Menu:
  97.  
  98. * Keyword list::                RCS Keywords
  99. * Using keywords::              Using keywords
  100. * Avoiding substitution::       Avoiding substitution
  101. * Substitution modes::          Substitution modes
  102. * Log keyword::                 Problems with the $Log$ keyword.
  103.  
  104. 
  105. File: cvs.info,  Node: Keyword list,  Next: Using keywords,  Up: Keyword substitution
  106.  
  107. RCS Keywords
  108. ============
  109.  
  110.    This is a list of the keywords that RCS currently (in release
  111. 5.6.0.1) supports:
  112.  
  113. `$Author$'
  114.      The login name of the user who checked in the revision.
  115.  
  116. `$Date$'
  117.      The date and time (UTC) the revision was checked in.
  118.  
  119. `$Header$'
  120.      A standard header containing the full pathname of the RCS file,
  121.      the revision number, the date (UTC), the author, the state, and
  122.      the locker (if locked).  Files will normally never be locked when
  123.      you use CVS.
  124.  
  125. `$Id$'
  126.      Same as `$Header$', except that the RCS filename is without a path.
  127.  
  128. `$Locker$'
  129.      The login name of the user who locked the revision (empty if not
  130.      locked, and thus almost always useless when you are using CVS).
  131.  
  132. `$Log$'
  133.      The log message supplied during commit, preceded by a header
  134.      containing the RCS filename, the revision number, the author, and
  135.      the date (UTC).  Existing log messages are *not* replaced.
  136.      Instead, the new log message is inserted after `$Log:...$'.  Each
  137.      new line is prefixed with a "comment leader" which RCS guesses
  138.      from the file name extension.  It can be changed with `cvs admin
  139.      -c'.  *Note admin options::.  This keyword is useful for
  140.      accumulating a complete change log in a source file, but for
  141.      several reasons it can be problematic.  *Note Log keyword::.
  142.  
  143. `$RCSfile$'
  144.      The name of the RCS file without a path.
  145.  
  146. `$Revision$'
  147.      The revision number assigned to the revision.
  148.  
  149. `$Source$'
  150.      The full pathname of the RCS file.
  151.  
  152. `$State$'
  153.      The state assigned to the revision.  States can be assigned with
  154.      `cvs admin -s'--*Note admin options::.
  155.  
  156. 
  157. File: cvs.info,  Node: Using keywords,  Next: Avoiding substitution,  Prev: Keyword list,  Up: Keyword substitution
  158.  
  159. Using keywords
  160. ==============
  161.  
  162.    To include a keyword string you simply include the relevant text
  163. string, such as `$Id$', inside the file, and commit the file.  CVS will
  164. automatically expand the string as part of the commit operation.
  165.  
  166.    It is common to embed `$Id$' string in the C source code.  This
  167. example shows the first few lines of a typical file, after keyword
  168. substitution has been performed:
  169.  
  170.      static char *rcsid="$Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
  171.      /* The following lines will prevent `gcc' version 2.X
  172.         from issuing an "unused variable" warning. */
  173.      #if __GNUC__ == 2
  174.      #define USE(var) static void * use_##var = (&use_##var, (void *) &var)
  175.      USE (rcsid);
  176.      #endif
  177.  
  178.    Even though a clever optimizing compiler could remove the unused
  179. variable `rcsid', most compilers tend to include the string in the
  180. binary.  Some compilers have a `#pragma' directive to include literal
  181. text in the binary.
  182.  
  183.    The `ident' command (which is part of the RCS package) can be used
  184. to extract keywords and their values from a file.  This can be handy
  185. for text files, but it is even more useful for extracting keywords from
  186. binary files.
  187.  
  188.      $ ident samp.c
  189.      samp.c:
  190.           $Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
  191.      $ gcc samp.c
  192.      $ ident a.out
  193.      a.out:
  194.           $Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $
  195.  
  196.    SCCS is another popular revision control system.  It has a command,
  197. `what', which is very similar to `ident' and used for the same purpose.
  198. Many sites without RCS have SCCS.  Since `what' looks for the
  199. character sequence `@(#)' it is easy to include keywords that are
  200. detected by either command.  Simply prefix the RCS keyword with the
  201. magic SCCS phrase, like this:
  202.  
  203.      static char *id="@(#) $Id: ab.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
  204.  
  205. 
  206. File: cvs.info,  Node: Avoiding substitution,  Next: Substitution modes,  Prev: Using keywords,  Up: Keyword substitution
  207.  
  208. Avoiding substitution
  209. =====================
  210.  
  211.    Keyword substitution has its disadvantages.  Sometimes you might
  212. want the literal text string `$Author$' to appear inside a file without
  213. RCS interpreting it as a keyword and expanding it into something like
  214. `$Author: ceder $'.
  215.  
  216.    There is unfortunately no way to selectively turn off keyword
  217. substitution.  You can use `-ko' (*note Substitution modes::.) to turn
  218. off keyword substitution entirely.
  219.  
  220.    In many cases you can avoid using RCS keywords in the source, even
  221. though they appear in the final product.  For example, the source for
  222. this manual contains `$@asis{}Author$' whenever the text `$Author$'
  223. should appear.  In `nroff' and `troff' you can embed the null-character
  224. `\&' inside the keyword for a similar effect.
  225.  
  226. 
  227. File: cvs.info,  Node: Substitution modes,  Next: Log keyword,  Prev: Avoiding substitution,  Up: Keyword substitution
  228.  
  229. Substitution modes
  230. ==================
  231.  
  232.    Each file has a stored default substitution mode, and each working
  233. directory copy of a file also has a substitution mode.  The former is
  234. set by the `-k' option to `cvs add' and `cvs admin'; the latter is set
  235. by the -k or -A options to `cvs checkout' or `cvs update'.  `cvs diff'
  236. also has a `-k' option.  For some examples, *Note Binary files::.
  237.  
  238.    The modes available are:
  239.  
  240. `-kkv'
  241.      Generate keyword strings using the default form, e.g.  `$Revision:
  242.      5.7 $' for the `Revision' keyword.
  243.  
  244. `-kkvl'
  245.      Like `-kkv', except that a locker's name is always inserted if the
  246.      given revision is currently locked.  This option is normally not
  247.      useful when CVS is used.
  248.  
  249. `-kk'
  250.      Generate only keyword names in keyword strings; omit their values.
  251.      For example, for the `Revision' keyword, generate the string
  252.      `$Revision$' instead of `$Revision: 5.7 $'.  This option is useful
  253.      to ignore differences due to keyword substitution when comparing
  254.      different revisions of a file.
  255.  
  256. `-ko'
  257.      Generate the old keyword string, present in the working file just
  258.      before it was checked in.  For example, for the `Revision'
  259.      keyword, generate the string `$Revision: 1.1 $' instead of
  260.      `$Revision: 5.7 $' if that is how the string appeared when the
  261.      file was checked in.
  262.  
  263. `-kb'
  264.      Like `-ko', but also inhibit conversion of line endings between
  265.      the canonical form in which they are stored in the repository
  266.      (linefeed only), and the form appropriate to the operating system
  267.      in use on the client.  For systems, like unix, which use linefeed
  268.      only to terminate lines, this is the same as `-ko'.  For more
  269.      information on binary files, see *Note Binary files::.
  270.  
  271. `-kv'
  272.      Generate only keyword values for keyword strings.  For example,
  273.      for the `Revision' keyword, generate the string `5.7' instead of
  274.      `$Revision: 5.7 $'.  This can help generate files in programming
  275.      languages where it is hard to strip keyword delimiters like
  276.      `$Revision: $' from a string.  However, further keyword
  277.      substitution cannot be performed once the keyword names are
  278.      removed, so this option should be used with care.
  279.  
  280.      One often would like to use `-kv' with `cvs export'--*note
  281.      export::..  But be aware that doesn't handle an export containing
  282.      binary files correctly.
  283.  
  284. 
  285. File: cvs.info,  Node: Log keyword,  Prev: Substitution modes,  Up: Keyword substitution
  286.  
  287. Problems with the $Log$ keyword.
  288. ================================
  289.  
  290.    The `$Log$' keyword is somewhat controversial.  As long as you are
  291. working on your development system the information is easily accessible
  292. even if you do not use the `$Log$' keyword--just do a `cvs log'.  Once
  293. you export the file the history information might be useless anyhow.
  294.  
  295.    A more serious concern is that RCS is not good at handling `$Log$'
  296. entries when a branch is merged onto the main trunk.  Conflicts often
  297. result from the merging operation.
  298.  
  299.    People also tend to "fix" the log entries in the file (correcting
  300. spelling mistakes and maybe even factual errors).  If that is done the
  301. information from `cvs log' will not be consistent with the information
  302. inside the file.  This may or may not be a problem in real life.
  303.  
  304.    It has been suggested that the `$Log$' keyword should be inserted
  305. *last* in the file, and not in the files header, if it is to be used at
  306. all.  That way the long list of change messages will not interfere with
  307. everyday source file browsing.
  308.  
  309. 
  310. File: cvs.info,  Node: Binary files,  Next: Revision management,  Prev: Keyword substitution,  Up: Top
  311.  
  312. Handling binary files
  313. *********************
  314.  
  315.    There are two issues with using CVS to store binary files.  The
  316. first is that CVS by default convert line endings between the canonical
  317. form in which they are stored in the repository (linefeed only), and
  318. the form appropriate to the operating system in use on the client (for
  319. example, carriage return followed by line feed for Windows NT).
  320.  
  321.    The second is that a binary file might happen to contain data which
  322. looks like a keyword (*note Keyword substitution::.), so keyword
  323. expansion must be turned off.
  324.  
  325.    The `-kb' option available with some CVS commands insures that
  326. neither line ending conversion nor keyword expansion will be done.  If
  327. you are using an old version of RCS without this option, and you are
  328. using an operating system, such as unix, which terminates lines with
  329. linefeeds only, you can use `-ko' instead; if you are on another
  330. operating system, upgrade to a version of RCS, such as 5.7 or later,
  331. which supports `-kb'.
  332.  
  333.    Here is an example of how you can create a new file using the `-kb'
  334. flag:
  335.  
  336.      $ echo '$Id$' > kotest
  337.      $ cvs add -kb -m"A test file" kotest
  338.      $ cvs ci -m"First checkin; contains a keyword" kotest
  339.  
  340.    If a file accidentally gets added without `-kb', one can use the
  341. `cvs admin' command to recover.  For example:
  342.  
  343.      $ echo '$Id$' > kotest
  344.      $ cvs add -m"A test file" kotest
  345.      $ cvs ci -m"First checkin; contains a keyword" kotest
  346.      $ cvs admin -kb kotest
  347.      $ cvs update -A kotest
  348.  
  349.    When you check in the file `kotest' the keywords are expanded.  (Try
  350. the above example, and do a `cat kotest' after every command).  The `cvs
  351. admin -kb' command sets the default keyword substitution method for
  352. this file, but it does not alter the working copy of the file that you
  353. have.  The easiest way to get the unexpanded version of `kotest' is
  354. `cvs update -A'.
  355.  
  356. 
  357. File: cvs.info,  Node: Revision management,  Next: Invoking CVS,  Prev: Binary files,  Up: Top
  358.  
  359. Revision management
  360. *******************
  361.  
  362.    If you have read this far, you probably have a pretty good grasp on
  363. what CVS can do for you.  This chapter talks a little about things that
  364. you still have to decide.
  365.  
  366.    If you are doing development on your own using CVS you could
  367. probably skip this chapter.  The questions this chapter takes up become
  368. more important when more than one person is working in a repository.
  369.  
  370. * Menu:
  371.  
  372. * When to commit::              Some discussion on the subject
  373.  
  374. 
  375. File: cvs.info,  Node: When to commit,  Up: Revision management
  376.  
  377. When to commit?
  378. ===============
  379.  
  380.    Your group should decide which policy to use regarding commits.
  381. Several policies are possible, and as your experience with CVS grows
  382. you will probably find out what works for you.
  383.  
  384.    If you commit files too quickly you might commit files that do not
  385. even compile.  If your partner updates his working sources to include
  386. your buggy file, he will be unable to compile the code.  On the other
  387. hand, other persons will not be able to benefit from the improvements
  388. you make to the code if you commit very seldom, and conflicts will
  389. probably be more common.
  390.  
  391.    It is common to only commit files after making sure that they can be
  392. compiled.  Some sites require that the files pass a test suite.
  393. Policies like this can be enforced using the commitinfo file (*note
  394. commitinfo::.), but you should think twice before you enforce such a
  395. convention.  By making the development environment too controlled it
  396. might become too regimented and thus counter-productive to the real
  397. goal, which is to get software written.
  398.  
  399. 
  400. File: cvs.info,  Node: Invoking CVS,  Next: Administrative files,  Prev: Revision management,  Up: Top
  401.  
  402. Reference manual for CVS commands
  403. *********************************
  404.  
  405.    This appendix describes how to invoke CVS, and describes in detail
  406. those subcommands of CVS which are not fully described elsewhere.  To
  407. look up a particular subcommand, see *Note Index::.
  408.  
  409. * Menu:
  410.  
  411. * Structure::                   Overall structure of CVS commands
  412. * ~/.cvsrc::                    Default options with the ~/.csvrc file
  413. * Global options::              Options you give to the left of cvs_command
  414. * Common options::              Options you give to the right of cvs_command
  415. * add::                         Add a new file/directory to the repository
  416. * admin::                       Administration front end for rcs
  417. * checkout::                    Checkout sources for editing
  418. * commit::                      Check files into the repository
  419. * diff::                        Run diffs between revisions
  420. * export::                      Export sources from CVS, similar to checkout
  421. * history::                     Show status of files and users
  422. * import::                      Import sources into CVS, using vendor branches
  423. * log::                         Print out 'rlog' information for files
  424. * rdiff::                       'patch' format diffs between releases
  425. * release::                     Indicate that a Module is no longer in use
  426. * rtag::                        Add a tag to a module
  427. * status::                      Status info on the revisions
  428. * tag::                         Add a tag to checked out version
  429. * update::                      Bring work tree in sync with repository
  430.  
  431. 
  432. File: cvs.info,  Node: Structure,  Next: ~/.cvsrc,  Up: Invoking CVS
  433.  
  434. Overall structure of CVS commands
  435. =================================
  436.  
  437.    The first release of CVS consisted of a number of shell-scripts.
  438. Today CVS is implemented as a single program that is a front-end to RCS
  439. and `diff'. The overall format of all CVS commands is:
  440.  
  441.      cvs [ cvs_options ] cvs_command [ command_options ] [ command_args ]
  442.  
  443. `cvs'
  444.      The program that is a front-end to RCS.
  445.  
  446. `cvs_options'
  447.      Some options that affect all sub-commands of CVS.  These are
  448.      described below.
  449.  
  450. `cvs_command'
  451.      One of several different sub-commands.  Some of the commands have
  452.      aliases that can be used instead; those aliases are noted in the
  453.      reference manual for that command.  There are only two situations
  454.      where you may omit `cvs_command': `cvs -H' elicits a list of
  455.      available commands, and `cvs -v' displays version information on
  456.      CVS itself.
  457.  
  458. `command_options'
  459.      Options that are specific for the command.
  460.  
  461. `command_args'
  462.      Arguments to the commands.
  463.  
  464.    There is unfortunately some confusion between `cvs_options' and
  465. `command_options'.  `-l', when given as a `cvs_option', only affects
  466. some of the commands.  When it is given as a `command_option' is has a
  467. different meaning, and is accepted by more commands.  In other words,
  468. do not take the above categorization too seriously.  Look at the
  469. documentation instead.
  470.  
  471. 
  472. File: cvs.info,  Node: ~/.cvsrc,  Next: Global options,  Prev: Structure,  Up: Invoking CVS
  473.  
  474. Default options and the ~/.cvsrc file
  475. =====================================
  476.  
  477.    There are some `command_options' that are used so often that you
  478. might have set up an alias or some other means to make sure you always
  479. specify that option.  One example (the one that drove the
  480. implementation of the .cvsrc support, actually) is that many people
  481. find the default output of the `diff' command to be very hard to read,
  482. and that either context diffs or unidiffs are much easier to understand.
  483.  
  484.    The `~/.cvsrc' file is a way that you can add default options to
  485. `cvs_commands' within cvs, instead of relying on aliases or other shell
  486. scripts.
  487.  
  488.    The format of the `~/.cvsrc' file is simple.  The file is searched
  489. for a line that begins with the same name as the `cvs_command' being
  490. executed.  If a match is found, then the remainder of the line is split
  491. up (at whitespace characters) into separate options and added to the
  492. command arguments *before* any options from the command line.
  493.  
  494.    If a command has two names (e.g., `checkout' and `co'), the official
  495. name, not necessarily the one used on the command line, will be used to
  496. match against the file.  So if this is the contents of the user's
  497. `~/.cvsrc' file:
  498.  
  499.      log -N
  500.      diff -u
  501.      update -P
  502.      co -P
  503.  
  504. the command `cvs checkout foo' would have the `-P' option added to the
  505. arguments, as well as `cvs co foo'.
  506.  
  507.    With the example file above, the output from `cvs diff foobar' will
  508. be in unidiff format.  `cvs diff -c foobar' will provide context diffs,
  509. as usual.  Getting "old" format diffs would be slightly more
  510. complicated, because `diff' doesn't have an option to specify use of
  511. the "old" format, so you would need `cvs -f diff foobar'.
  512.  
  513.    In place of the command name you can use `cvs' to specify global
  514. options (*note Global options::.).  For example the following line in
  515. `.cvsrc'
  516.  
  517.      cvs -z6
  518.  
  519.    causes CVS to use compression level 6
  520.  
  521. 
  522. File: cvs.info,  Node: Global options,  Next: Common options,  Prev: ~/.cvsrc,  Up: Invoking CVS
  523.  
  524. Global options
  525. ==============
  526.  
  527.    The available `cvs_options' (that are given to the left of
  528. `cvs_command') are:
  529.  
  530. `-b BINDIR'
  531.      Use BINDIR as the directory where RCS programs are located.
  532.      Overrides the setting of the `$RCSBIN' environment variable and
  533.      any precompiled directory.  This parameter should be specified as
  534.      an absolute pathname.
  535.  
  536. `-d CVS_ROOT_DIRECTORY'
  537.      Use CVS_ROOT_DIRECTORY as the root directory pathname of the
  538.      repository.  Overrides the setting of the `$CVSROOT' environment
  539.      variable.  *Note Repository::.
  540.  
  541. `-e EDITOR'
  542.      Use EDITOR to enter revision log information.  Overrides the
  543.      setting of the `$CVSEDITOR' and `$EDITOR' environment variables.
  544.  
  545. `-f'
  546.      Do not read the `~/.cvsrc' file.  This option is most often used
  547.      because of the non-orthogonality of the CVS option set.  For
  548.      example, the `cvs log' option `-N' (turn off display of tag names)
  549.      does not have a corresponding option to turn the display on.  So
  550.      if you have `-N' in the `~/.cvsrc' entry for `diff', you may need
  551.      to use `-f' to show the tag names.  (1)
  552.  
  553. `-H'
  554.      Display usage information about the specified `cvs_command' (but
  555.      do not actually execute the command).  If you don't specify a
  556.      command name, `cvs -H' displays a summary of all the commands
  557.      available.
  558.  
  559. `-l'
  560.      Do not log the cvs_command in the command history (but execute it
  561.      anyway).  *Note history::, for information on command history.
  562.  
  563. `-n'
  564.      Do not change any files.  Attempt to execute the `cvs_command',
  565.      but only to issue reports; do not remove, update, or merge any
  566.      existing files, or create any new files.
  567.  
  568. `-Q'
  569.      Cause the command to be really quiet; the command will only
  570.      generate output for serious problems.
  571.  
  572. `-q'
  573.      Cause the command to be somewhat quiet; informational messages,
  574.      such as reports of recursion through subdirectories, are
  575.      suppressed.
  576.  
  577. `-r'
  578.      Make new working files files read-only.  Same effect as if the
  579.      `$CVSREAD' environment variable is set (*note Environment
  580.      variables::.).  The default is to make working files writable,
  581.      unless watches are on (*note Watches::.).
  582.  
  583. `-s VARIABLE=VALUE'
  584.      Set a user variable (*note Variables::.).
  585.  
  586. `-t'
  587.      Trace program execution; display messages showing the steps of CVS
  588.      activity.  Particularly useful with `-n' to explore the potential
  589.      impact of an unfamiliar command.
  590.  
  591. `-v'
  592.      Display version and copyright information for CVS.
  593.  
  594. `-w'
  595.      Make new working files read-write.  Overrides the setting of the
  596.      `$CVSREAD' environment variable.  Files are created read-write by
  597.      default, unless `$CVSREAD' is set or `-r' is given.
  598.  
  599. `-z GZIP-LEVEL'
  600.      Set the compression level.  Only has an effect on the CVS client.
  601.  
  602.    ---------- Footnotes ----------
  603.  
  604.    (1)  Yes, this really should be fixed, and it's being worked on
  605.  
  606. 
  607. File: cvs.info,  Node: Common options,  Next: add,  Prev: Global options,  Up: Invoking CVS
  608.  
  609. Common command options
  610. ======================
  611.  
  612.    This section describes the `command_options' that are available
  613. across several CVS commands.  These options are always given to the
  614. right of `cvs_command'. Not all commands support all of these options;
  615. each option is only supported for commands where it makes sense.
  616. However, when a command has one of these options you can almost always
  617. count on the same behavior of the option as in other commands.  (Other
  618. command options, which are listed with the individual commands, may have
  619. different behavior from one CVS command to the other).
  620.  
  621.    *Warning:* the `history' command is an exception; it supports many
  622. options that conflict even with these standard options.
  623.  
  624. `-D DATE_SPEC'
  625.      Use the most recent revision no later than DATE_SPEC.  DATE_SPEC
  626.      is a single argument, a date description specifying a date in the
  627.      past.
  628.  
  629.      The specification is "sticky" when you use it to make a private
  630.      copy of a source file; that is, when you get a working file using
  631.      `-D', CVS records the date you specified, so that further updates
  632.      in the same directory will use the same date (for more information
  633.      on sticky tags/dates, *note Sticky tags::.).
  634.  
  635.      A wide variety of date formats are supported by the underlying RCS
  636.      facilities, similar to those described in co(1), but not exactly
  637.      the same.  The DATE_SPEC is interpreted as being in the local
  638.      timezone, unless a specific timezone is specified.  Examples of
  639.      valid date specifications include:
  640.  
  641.                               1 month ago
  642.                               2 hours ago
  643.                               400000 seconds ago
  644.                               last year
  645.                               last Monday
  646.                               yesterday
  647.                               a fortnight ago
  648.                               3/31/92 10:00:07 PST
  649.                               January 23, 1987 10:05pm
  650.                               22:00 GMT
  651.  
  652.      `-D' is available with the `checkout', `diff', `export', `history',
  653.      `rdiff', `rtag', and `update' commands.  (The `history' command
  654.      uses this option in a slightly different way; *note history
  655.      options::.).
  656.  
  657.      Remember to quote the argument to the `-D' flag so that your shell
  658.      doesn't interpret spaces as argument separators.  A command using
  659.      the `-D' flag can look like this:
  660.  
  661.           $ cvs diff -D "1 hour ago" cvs.texinfo
  662.  
  663. `-f'
  664.      When you specify a particular date or tag to CVS commands, they
  665.      normally ignore files that do not contain the tag (or did not
  666.      exist prior to the date) that you specified.  Use the `-f' option
  667.      if you want files retrieved even when there is no match for the
  668.      tag or date.  (The most recent revision of the file will be used).
  669.  
  670.      `-f' is available with these commands: `checkout', `export',
  671.      `rdiff', `rtag', and `update'.
  672.  
  673.      *Warning:*  The `commit' command also has a `-f' option, but it
  674.      has a different behavior for that command.  *Note commit options::.
  675.  
  676. `-H'
  677.      Help; describe the options available for this command.  This is
  678.      the only option supported for all CVS commands.
  679.  
  680. `-k KFLAG'
  681.      Alter the default RCS processing of keywords.  *Note Keyword
  682.      substitution::, for the meaning of KFLAG.  Your KFLAG
  683.      specification is "sticky" when you use it to create a private copy
  684.      of a source file; that is, when you use this option with the
  685.      `checkout' or `update' commands, CVS associates your selected
  686.      KFLAG with the file, and continues to use it with future update
  687.      commands on the same file until you specify otherwise.
  688.  
  689.      The `-k' option is available with the `add', `checkout', `diff' and
  690.      `update' commands.
  691.  
  692. `-l'
  693.      Local; run only in current working directory, rather than
  694.      recursing through subdirectories.
  695.  
  696.      *Warning:* this is not the same as the overall `cvs -l' option,
  697.      which you can specify to the left of a cvs command!
  698.  
  699.      Available with the following commands: `checkout', `commit',
  700.      `diff', `export', `log', `remove', `rdiff', `rtag', `status',
  701.      `tag', and `update'.
  702.  
  703. `-m MESSAGE'
  704.      Use MESSAGE as log information, instead of invoking an editor.
  705.  
  706.      Available with the following commands: `add', `commit' and
  707.      `import'.
  708.  
  709. `-n'
  710.      Do not run any checkout/commit/tag program.  (A program can be
  711.      specified to run on each of these activities, in the modules
  712.      database (*note modules::.); this option bypasses it).
  713.  
  714.      *Warning:* this is not the same as the overall `cvs -n' option,
  715.      which you can specify to the left of a cvs command!
  716.  
  717.      Available with the `checkout', `commit', `export', and `rtag'
  718.      commands.
  719.  
  720. `-P'
  721.      Prune (remove) directories that are empty after being updated, on
  722.      `checkout', or `update'.  Normally, an empty directory (one that
  723.      is void of revision-controlled files) is left alone.  Specifying
  724.      `-P' will cause these directories to be silently removed from your
  725.      checked-out sources.  This does not remove the directory from the
  726.      repository, only from your checked out copy.  Note that this
  727.      option is implied by the `-r' or `-D' options of `checkout' and
  728.      `export'.
  729.  
  730. `-p'
  731.      Pipe the files retrieved from the repository to standard output,
  732.      rather than writing them in the current directory.  Available with
  733.      the `checkout' and `update' commands.
  734.  
  735. `-W'
  736.      Specify file names that should be filtered.  You can use this
  737.      option repeatedly.  The spec can be a file name pattern of the
  738.      same type that you can specify in the `.cvswrappers' file.
  739.      Avaliable with the following commands: `import', and `update'.
  740.  
  741. `-r TAG'
  742.      Use the revision specified by the TAG argument instead of the
  743.      default "head" revision.  As well as arbitrary tags defined with
  744.      the `tag' or `rtag' command, two special tags are always
  745.      available: `HEAD' refers to the most recent version available in
  746.      the repository, and `BASE' refers to the revision you last checked
  747.      out into the current working directory.
  748.  
  749.      The tag specification is sticky when you use this option with
  750.      `checkout' or `update' to make your own copy of a file: CVS
  751.      remembers the tag and continues to use it on future update
  752.      commands, until you specify otherwise (for more information on
  753.      sticky tags/dates, *note Sticky tags::.).  The tag can be either a
  754.      symbolic or numeric tag.  *Note Tags::.
  755.  
  756.      Specifying the `-q' global option along with the `-r' command
  757.      option is often useful, to suppress the warning messages when the
  758.      RCS history file does not contain the specified tag.
  759.  
  760.      *Warning:* this is not the same as the overall `cvs -r' option,
  761.      which you can specify to the left of a cvs command!
  762.  
  763.      `-r' is available with the `checkout', `commit', `diff',
  764.      `history', `export', `rdiff', `rtag', and `update' commands.
  765.  
  766. 
  767. File: cvs.info,  Node: add,  Next: admin,  Prev: Common options,  Up: Invoking CVS
  768.  
  769. add--Add a new file/directory to the repository
  770. ===============================================
  771.  
  772.    * Synopsis: add [-k kflag] [-m 'message'] files...
  773.  
  774.    * Requires: repository, working directory.
  775.  
  776.    * Changes: working directory.
  777.  
  778.    * Synonym: new
  779.  
  780.    Use the `add' command to create a new file or directory in the
  781. source repository.  The files or directories specified with `add' must
  782. already exist in the current directory (which must have been created
  783. with the `checkout' command).  To add a whole new directory hierarchy
  784. to the source repository (for example, files received from a
  785. third-party vendor), use the `import' command instead.  *Note import::.
  786.  
  787.    If the argument to `add' refers to an immediate sub-directory, the
  788. directory is created at the correct place in the source repository, and
  789. the necessary CVS administration files are created in your working
  790. directory.  If the directory already exists in the source repository,
  791. `add' still creates the administration files in your version of the
  792. directory.  This allows you to use `add' to add a particular directory
  793. to your private sources even if someone else created that directory
  794. after your checkout of the sources.  You can do the following:
  795.  
  796.      $ mkdir new_directory
  797.      $ cvs add new_directory
  798.      $ cvs update new_directory
  799.  
  800.    An alternate approach using `update' might be:
  801.  
  802.      $ cvs update -d new_directory
  803.  
  804.    (To add any available new directories to your working directory,
  805. it's probably simpler to use `checkout' (*note checkout::.) or `update
  806. -d' (*note update::.)).
  807.  
  808.    The added files are not placed in the source repository until you
  809. use `commit' to make the change permanent.  Doing an `add' on a file
  810. that was removed with the `remove' command will resurrect the file,
  811. unless a `commit' command intervened.  *Note Removing files::, for an
  812. example.
  813.  
  814.    Unlike most other commands `add' never recurses down directories.
  815. It cannot yet handle relative paths.  Instead of
  816.  
  817.      $ cvs add foo/bar.c
  818.  
  819.    you have to do
  820.  
  821.      $ cd foo
  822.      $ cvs add bar.c
  823.  
  824. * Menu:
  825.  
  826. * add options::                 add options
  827. * add examples::                add examples
  828.  
  829. 
  830. File: cvs.info,  Node: add options,  Next: add examples,  Up: add
  831.  
  832. add options
  833. -----------
  834.  
  835.    There are only two options you can give to `add':
  836.  
  837. `-k KFLAG'
  838.      This option specifies the default way that this file will be
  839.      checked out.  The KFLAG argument (*note Substitution modes::.) is
  840.      stored in the RCS file and can be changed with `admin -k' (*note
  841.      admin options::.).  See *Note Binary files::, for information on
  842.      using this option for binary files.
  843.  
  844. `-m DESCRIPTION'
  845.      Using this option, you can give a description for the file.  This
  846.      description appears in the history log (if it is enabled, *note
  847.      history file::.).  It will also be saved in the RCS history file
  848.      inside the repository when the file is committed.  The `log'
  849.      command displays this description.
  850.  
  851.      The description can be changed using `admin -t'.  *Note admin::.
  852.  
  853.      If you omit the `-m DESCRIPTION' flag, an empty string will be
  854.      used.  You will not be prompted for a description.
  855.  
  856. 
  857. File: cvs.info,  Node: add examples,  Prev: add options,  Up: add
  858.  
  859. add examples
  860. ------------
  861.  
  862.    To add the file `backend.c' to the repository, with a description,
  863. the following can be used.
  864.  
  865.      $ cvs add -m "Optimizer and code generation passes." backend.c
  866.      $ cvs commit -m "Early version. Not yet compilable." backend.c
  867.  
  868. 
  869. File: cvs.info,  Node: admin,  Next: checkout,  Prev: add,  Up: Invoking CVS
  870.  
  871. admin--Administration front end for rcs
  872. =======================================
  873.  
  874.    * Requires: repository, working directory.
  875.  
  876.    * Changes: repository.
  877.  
  878.    * Synonym: rcs
  879.  
  880.    This is the CVS interface to assorted administrative RCS facilities,
  881. documented in rcs(1).  `admin' simply passes all its options and
  882. arguments to the `rcs' command; it does no filtering or other
  883. processing.  This command *does* work recursively, however, so extreme
  884. care should be used.
  885.  
  886.    If there is a group whose name matches a compiled in value which
  887. defaults to `cvsadmin', only members of that group can use `cvs admin'.
  888. To disallow `cvs admin' for all users, create a group with no users in
  889. it.
  890.  
  891. * Menu:
  892.  
  893. * admin options::               admin options
  894. * admin examples::              admin examples
  895.  
  896. 
  897. File: cvs.info,  Node: admin options,  Next: admin examples,  Up: admin
  898.  
  899. admin options
  900. -------------
  901.  
  902.    Not all valid `rcs' options are useful together with CVS.  Some even
  903. makes it impossible to use CVS until you undo the effect!
  904.  
  905.    This description of the available options is based on the `rcs(1)'
  906. man page, but modified to suit readers that are more interrested in CVS
  907. than RCS.
  908.  
  909. `-AOLDFILE'
  910.      Might not work together with CVS.  Append the access list of
  911.      OLDFILE to the access list of the RCS file.
  912.  
  913. `-aLOGINS'
  914.      Might not work together with CVS.  Append the login names
  915.      appearing in the comma-separated list LOGINS to the access list of
  916.      the RCS file.
  917.  
  918. `-b[REV]'
  919.      When used with bare RCS, this option sets the default branch to
  920.      REV; in CVS sticky tags (*note Sticky tags::.) are a better way to
  921.      decide which branch you want to work on.  With CVS, this option
  922.      can be used to control behavior with respect to the vendor branch.
  923.  
  924. `-cSTRING'
  925.      Useful with CVS.  Sets the comment leader to STRING.  The comment
  926.      leader is printed before every log message line generated by the
  927.      keyword `$Log$' (*note Keyword substitution::.).  This is useful
  928.      for programming languages without multi-line comments.  RCS
  929.      initially guesses the value of the comment leader from the file
  930.      name extension when the file is first committed.
  931.  
  932. `-e[LOGINS]'
  933.      Might not work together with CVS.  Erase the login names appearing
  934.      in the comma-separated list LOGINS from the access list of the RCS
  935.      file.  If LOGINS is omitted, erase the entire access list.
  936.  
  937. `-I'
  938.      Run interactively, even if the standard input is not a terminal.
  939.  
  940. `-i'
  941.      Useless with CVS.  When using bare RCS, this is used to create and
  942.      initialize a new RCS file, without depositing a revision.
  943.  
  944. `-kSUBST'
  945.      Useful with CVS.  Set the default keyword substitution to SUBST.
  946.      *Note Keyword substitution::.  Giving an explicit `-k' option to
  947.      `cvs update', `cvs export', or `cvs checkout' overrides this
  948.      default.
  949.  
  950. `-l[REV]'
  951.      Lock the revision with number REV.  If a branch is given, lock the
  952.      latest revision on that branch.  If REV is omitted, lock the
  953.      latest revision on the default branch.
  954.  
  955.      This can be used in conjunction with the `rcslock.pl' script in
  956.      the `contrib' directory of the CVS source distribution to provide
  957.      reserved checkouts (where only one user can be editing a given
  958.      file at a time).  See the comments in that file for details (and
  959.      see the `README' file in that directory for disclaimers about the
  960.      unsupported nature of contrib).  According to comments in that
  961.      file, locking must set to strict (which is the default).
  962.  
  963. `-L'
  964.      Set locking to strict.  Strict locking means that the owner of an
  965.      RCS file is not exempt from locking for checkin.  For use with
  966.      CVS, strict locking must be set; see the discussion under the `-l'
  967.      option above.
  968.  
  969. `-mREV:MSG'
  970.      Replace the log message of revision REV with MSG.
  971.  
  972. `-NNAME[:[REV]]'
  973.      Act like `-n', except override any previous assignment of NAME.
  974.  
  975. `-nNAME[:[REV]]'
  976.      Associate the symbolic name NAME with the branch or revision REV.
  977.      It is normally better to use `cvs tag' or `cvs rtag' instead.
  978.      Delete the symbolic name if both `:' and REV are omitted;
  979.      otherwise, print an error message if NAME is already associated
  980.      with another number.  If REV is symbolic, it is expanded before
  981.      association.  A REV consisting of a branch number followed by a
  982.      `.' stands for the current latest revision in the branch.  A `:'
  983.      with an empty REV stands for the current latest revision on the
  984.      default branch, normally the trunk.  For example, `rcs -nNAME:
  985.      RCS/*' associates NAME with the current latest revision of all the
  986.      named RCS files; this contrasts with `rcs -nNAME:$ RCS/*' which
  987.      associates NAME with the revision numbers extracted from keyword
  988.      strings in the corresponding working files.
  989.  
  990. `-oRANGE'
  991.      Potentially useful, but dangerous, with CVS (see below).  Deletes
  992.      ("outdates") the revisions given by RANGE.  A range consisting of
  993.      a single revision number means that revision.  A range consisting
  994.      of a branch number means the latest revision on that branch.  A
  995.      range of the form `REV1:REV2' means revisions REV1 to REV2 on the
  996.      same branch, `:REV' means from the beginning of the branch
  997.      containing REV up to and including REV, and `REV:' means from
  998.      revision REV to the end of the branch containing REV.  None of the
  999.      outdated revisions may have branches or locks.
  1000.  
  1001.      Due to the way CVS handles branches REV cannot be specified
  1002.      symbolically if it is a branch.  *Note Magic branch numbers::, for
  1003.      an explanation.
  1004.  
  1005.      Make sure that no-one has checked out a copy of the revision you
  1006.      outdate.  Strange things will happen if he starts to edit it and
  1007.      tries to check it back in.  For this reason, this option is not a
  1008.      good way to take back a bogus commit; commit a new revision
  1009.      undoing the bogus change instead (*note Merging two revisions::.).
  1010.  
  1011. `-q'
  1012.      Run quietly; do not print diagnostics.
  1013.  
  1014. `-sSTATE[:REV]'
  1015.      Useful with CVS.  Set the state attribute of the revision REV to
  1016.      STATE.  If REV is a branch number, assume the latest revision on
  1017.      that branch.  If REV is omitted, assume the latest revision on the
  1018.      default branch.  Any identifier is acceptable for STATE.  A useful
  1019.      set of states is `Exp' (for experimental), `Stab' (for stable),
  1020.      and `Rel' (for released).  By default, the state of a new revision
  1021.      is set to `Exp' when it is created.  The state is visible in the
  1022.      output from CVS LOG (*note log::.), and in the `$Log$' and
  1023.      `$State$' keywords (*note Keyword substitution::.).  Note that CVS
  1024.      uses the `dead' state for its own purposes; to take a file to or
  1025.      from the `dead' state use commands like `cvs remove' and `cvs
  1026.      add', not `cvs admin -s'.
  1027.  
  1028. `-t[FILE]'
  1029.      Useful with CVS.  Write descriptive text from the contents of the
  1030.      named FILE into the RCS file, deleting the existing text.  The
  1031.      FILE pathname may not begin with `-'.  If FILE is omitted, obtain
  1032.      the text from standard input, terminated by end-of-file or by a
  1033.      line containing `.' by itself.  Prompt for the text if interaction
  1034.      is possible; see `-I'.  The descriptive text can be seen in the
  1035.      output from `cvs log' (*note log::.).
  1036.  
  1037. `-t-STRING'
  1038.      Similar to `-tFILE'. Write descriptive text from the STRING into
  1039.      the RCS file, deleting the existing text.
  1040.  
  1041. `-U'
  1042.      Set locking to non-strict.  Non-strict locking means that the
  1043.      owner of a file need not lock a revision for checkin.  For use
  1044.      with CVS, strict locking must be set; see the discussion under the
  1045.      `-l' option above.
  1046.  
  1047. `-u[REV]'
  1048.      See the option `-l' above, for a discussion of using this option
  1049.      with CVS.  Unlock the revision with number REV.  If a branch is
  1050.      given, unlock the latest revision on that branch.  If REV is
  1051.      omitted, remove the latest lock held by the caller.  Normally,
  1052.      only the locker of a revision may unlock it.  Somebody else
  1053.      unlocking a revision breaks the lock.  This causes a mail message
  1054.      to be sent to the original locker.  The message contains a
  1055.      commentary solicited from the breaker.  The commentary is
  1056.      terminated by end-of-file or by a line containing `.' by itself.
  1057.  
  1058. `-VN'
  1059.      Emulate RCS version N. Use -VN to make an RCS file acceptable to
  1060.      RCS version N by discarding information that would confuse version
  1061.      N.
  1062.  
  1063. `-xSUFFIXES'
  1064.      Useless with CVS. Use SUFFIXES to characterize RCS files.
  1065.  
  1066. 
  1067. File: cvs.info,  Node: admin examples,  Prev: admin options,  Up: admin
  1068.  
  1069. admin examples
  1070. --------------
  1071.  
  1072. Outdating is dangerous
  1073. ......................
  1074.  
  1075.    First, an example of how *not* to use the `admin' command.  It is
  1076. included to stress the fact that this command can be quite dangerous
  1077. unless you know *exactly* what you are doing.
  1078.  
  1079.    The `-o' option can be used to "outdate" old revisions from the
  1080. history file.  If you are short on disc this option might help you.
  1081. But think twice before using it--there is no way short of restoring the
  1082. latest backup to undo this command!
  1083.  
  1084.    The next line is an example of a command that you would *not* like
  1085. to execute.
  1086.  
  1087.      $ cvs admin -o:R_1_02 .
  1088.  
  1089.    The above command will delete all revisions up to, and including,
  1090. the revision that corresponds to the tag R_1_02.  But beware!  If there
  1091. are files that have not changed between R_1_02 and R_1_03 the file will
  1092. have *the same* numerical revision number assigned to the tags R_1_02
  1093. and R_1_03.  So not only will it be impossible to retrieve R_1_02;
  1094. R_1_03 will also have to be restored from the tapes!
  1095.  
  1096. Comment leaders
  1097. ...............
  1098.  
  1099.    If you use the `$Log$' keyword and you do not agree with the guess
  1100. for comment leader that CVS has done, you can enforce your will with
  1101. `cvs admin -c'.  This might be suitable for `nroff' source:
  1102.  
  1103.      $ cvs admin -c'.\" ' *.man
  1104.      $ rm *.man
  1105.      $ cvs update
  1106.  
  1107.    The two last steps are to make sure that you get the versions with
  1108. correct comment leaders in your working files.
  1109.  
  1110. 
  1111. File: cvs.info,  Node: checkout,  Next: commit,  Prev: admin,  Up: Invoking CVS
  1112.  
  1113. checkout--Check out sources for editing
  1114. =======================================
  1115.  
  1116.    * Synopsis: checkout [options] modules...
  1117.  
  1118.    * Requires: repository.
  1119.  
  1120.    * Changes: working directory.
  1121.  
  1122.    * Synonyms: co, get
  1123.  
  1124.    Make a working directory containing copies of the source files
  1125. specified by MODULES.  You must execute `checkout' before using most of
  1126. the other CVS commands, since most of them operate on your working
  1127. directory.
  1128.  
  1129.    The MODULES part of the command are either symbolic names for some
  1130. collection of source directories and files, or paths to directories or
  1131. files in the repository.  The symbolic names are defined in the
  1132. `modules' file.  *Note modules::.
  1133.  
  1134.    Depending on the modules you specify, `checkout' may recursively
  1135. create directories and populate them with the appropriate source files.
  1136. You can then edit these source files at any time (regardless of
  1137. whether other software developers are editing their own copies of the
  1138. sources); update them to include new changes applied by others to the
  1139. source repository; or commit your work as a permanent change to the
  1140. source repository.
  1141.  
  1142.    Note that `checkout' is used to create directories.  The top-level
  1143. directory created is always added to the directory where `checkout' is
  1144. invoked, and usually has the same name as the specified module.  In the
  1145. case of a module alias, the created sub-directory may have a different
  1146. name, but you can be sure that it will be a sub-directory, and that
  1147. `checkout' will show the relative path leading to each file as it is
  1148. extracted into your private work area (unless you specify the `-Q'
  1149. global option).
  1150.  
  1151.    The files created by `checkout' are created read-write, unless the
  1152. `-r' option to CVS (*note Global options::.) is specified, the
  1153. `CVSREAD' environment variable is specified (*note Environment
  1154. variables::.), or a watch is in effect for that file (*note Watches::.).
  1155.  
  1156.    Running `checkout' on a directory that was already built by a prior
  1157. `checkout' is also permitted, and has the same effect as specifying the
  1158. `-d' option to the `update' command, that is, any new directories that
  1159. have been created in the repository will appear in your work area.
  1160. *Note update::.
  1161.  
  1162. * Menu:
  1163.  
  1164. * checkout options::            checkout options
  1165. * checkout examples::           checkout examples
  1166.  
  1167. 
  1168. File: cvs.info,  Node: checkout options,  Next: checkout examples,  Up: checkout
  1169.  
  1170. checkout options
  1171. ----------------
  1172.  
  1173.    These standard options are supported by `checkout' (*note Common
  1174. options::., for a complete description of them):
  1175.  
  1176. `-D DATE'
  1177.      Use the most recent revision no later than DATE.  This option is
  1178.      sticky, and implies `-P'.  See *Note Sticky tags::, for more
  1179.      information on sticky tags/dates.
  1180.  
  1181. `-f'
  1182.      Only useful with the `-D DATE' or `-r TAG' flags.  If no matching
  1183.      revision is found, retrieve the most recent revision (instead of
  1184.      ignoring the file).
  1185.  
  1186. `-k KFLAG'
  1187.      Process RCS keywords according to KFLAG.  See co(1).  This option
  1188.      is sticky; future updates of this file in this working directory
  1189.      will use the same KFLAG.  The `status' command can be viewed to
  1190.      see the sticky options.  *Note status::.
  1191.  
  1192. `-l'
  1193.      Local; run only in current working directory.
  1194.  
  1195. `-n'
  1196.      Do not run any checkout program (as specified with the `-o' option
  1197.      in the modules file; *note modules::.).
  1198.  
  1199. `-P'
  1200.      Prune empty directories.
  1201.  
  1202. `-p'
  1203.      Pipe files to the standard output.
  1204.  
  1205. `-r TAG'
  1206.      Use revision TAG.  This option is sticky, and implies `-P'.  See
  1207.      *Note Sticky tags::, for more information on sticky tags/dates.
  1208.  
  1209.    In addition to those, you can use these special command options with
  1210. `checkout':
  1211.  
  1212. `-A'
  1213.      Reset any sticky tags, dates, or `-k' options.  See *Note Sticky
  1214.      tags::, for more information on sticky tags/dates.
  1215.  
  1216. `-c'
  1217.      Copy the module file, sorted, to the standard output, instead of
  1218.      creating or modifying any files or directories in your working
  1219.      directory.
  1220.  
  1221. `-d DIR'
  1222.      Create a directory called DIR for the working files, instead of
  1223.      using the module name.  Unless you also use `-N', the paths
  1224.      created under DIR will be as short as possible.
  1225.  
  1226. `-j TAG'
  1227.      With two `-j' options, merge changes from the revision specified
  1228.      with the first `-j' option to the revision specified with the
  1229.      second `j' option, into the working directory.
  1230.  
  1231.      With one `-j' option, merge changes from the ancestor revision to
  1232.      the revision specified with the `-j' option, into the working
  1233.      directory.  The ancestor revision is the common ancestor of the
  1234.      revision which the working directory is based on, and the revision
  1235.      specified in the `-j' option.
  1236.  
  1237.      In addition, each -j option can contain an optional date
  1238.      specification which, when used with branches, can limit the chosen
  1239.      revision to one within a specific date.  An optional date is
  1240.      specified by adding a colon (:) to the tag:
  1241.      `-jSYMBOLIC_TAG:DATE_SPECIFIER'.
  1242.  
  1243.      *Note Merging::.
  1244.  
  1245. `-N'
  1246.      Only useful together with `-d DIR'.  With this option, CVS will
  1247.      not shorten module paths in your working directory.  (Normally,
  1248.      CVS shortens paths as much as possible when you specify an
  1249.      explicit target directory).
  1250.  
  1251. `-s'
  1252.      Like `-c', but include the status of all modules, and sort it by
  1253.      the status string.  *Note modules::, for info about the `-s'
  1254.      option that is used inside the modules file to set the module
  1255.      status.
  1256.  
  1257. 
  1258. File: cvs.info,  Node: checkout examples,  Prev: checkout options,  Up: checkout
  1259.  
  1260. checkout examples
  1261. -----------------
  1262.  
  1263.    Get a copy of the module `tc':
  1264.  
  1265.      $ cvs checkout tc
  1266.  
  1267.    Get a copy of the module `tc' as it looked one day ago:
  1268.  
  1269.      $ cvs checkout -D yesterday tc
  1270.  
  1271.